﻿package com.taihua_tech.basic.controller.user;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taihua_tech.basic.service.UserService;
import com.taihua_tech.basic.util.NoteResult;
 

@Controller("loginController")
@RequestMapping("/user")
public class UserLoginController {
	@Resource
	private UserService userService;
	
	@RequestMapping("/login.do")
	@ResponseBody//将result结果转成json输出
	public NoteResult execute(
		String name,String password){
		System.out.println("调用Service处理方法");
		NoteResult result = 
			userService.checkLogin(name, password);
		return result;
	}
	
}
